package cn.xz.gobang.widget

import android.content.Context
import android.graphics.Typeface
import android.util.AttributeSet

/**
 * 主题字体*/
class TtfTextView : androidx.appcompat.widget.AppCompatTextView {

    constructor(context: Context?) : super(context!!) {}
    constructor(context: Context?, attrs: AttributeSet?) : super(context!!, attrs) {
        init(attrs)
    }

    constructor(context: Context?, attrs: AttributeSet?, defStyleAttr: Int) : super(context!!, attrs, defStyleAttr) {
        init(attrs)
    }


    private fun init(attrs: AttributeSet?) {
        val typeface = Typeface.createFromAsset(context.assets, "AlimamaDaoLiTi.ttf")
        this.typeface = typeface
    }

}